/**
 * Model.java 2008-05-16
 * 
 * Linker is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */

package linker.list;

import javax.swing.DefaultListModel;
import javax.swing.JPopupMenu;

/**
 * The model of list.Add refilter() and addElement() methods.
 * 
 * @version 2008-05-16
 * @author Jianfeng tujf.cn@gmail.com
 * 
 */

public abstract class Listmodel extends DefaultListModel implements ListState {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * Refilter the display items by the given string.
	 * 
	 * @param s
	 *            The given string.
	 */
	public void refilter(final String s) {
	}

	/**
	 * Add a element to the current list by the given string.
	 * 
	 * @param s
	 *            The given string.
	 */
	public void addElement(final String s) {
	}

	/**
	 * Double click by the given List Item.
	 * 
	 * @param item
	 *            The given List item.
	 */
	public abstract void doubleClickByItem(final ListItem item);

	/**
	 * Get popupMenu by the given list Item.
	 * 
	 * @param listItem
	 *            The given listItem.
	 * @return The correct popupMenu.
	 */
	public abstract JPopupMenu getPopupMenuByItem(final ListItem listItem);

}
